package com.apabi.service.elastic;

public class APIResult<T> {

	private String code;
	private String message;
	private T body;

	public APIResult(APICode apiCode) {
		this.code = apiCode.code();
	}

	public APIResult(APICode apiCode, T body) {
		this.code = apiCode.code();
		this.body = body;
	}

	public APIResult(APICode apiCode, String message, T body) {
		this.code = apiCode.code();
		this.message = message;
		this.body = body;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public T getBody() {
		return body;
	}

	public void setBody(T body) {
		this.body = body;
	}

}
